Ralf Horstmann fixes out of bound read in Google polyline reader.
authorrobertlipe <robertlipe@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Mon, 22 Dec 2014 19:27:44 +0000 (19:27 +0000)
committerrobertlipe <robertlipe@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Mon, 22 Dec 2014 19:27:44 +0000 (19:27 +0000)
gpsbabel/google.cc

index 66900303200f41bf215475c66b607a631fda0d39..01786de99bebd51ba883803991f818400e124f9e 100644 (file)
@@ -176,7 +176,7 @@ static long decode_goog64(char** str)
     c = (unsigned char)(*(*str)++)-'?';
     result |= (c & 31)<<shift;
     shift += 5;
-  } while (c & ~31);
+  } while (c & ~31 && **str);
 
   if (result & 1) {
     result = ~result;